﻿@model CodeStash.Models.Snippet.DisplaySnippetsViewModel
           
<div id="AjaxContents">
<p id="noSnippetsMessage" style="display:none;">There are no CodeSnippets to display</p>

@if (Model.IsTruncated)
{
    <br />
    <div class="errorMessage">
    <img style="margin:10px;" src="../../Content/images/error.png" height="50px" alt="" />
    <div style="position: absolute; display:inline-block; line-height:30px; height:30px;color:White">
        <p>
            <span>
            <strong>
            NOTE : 
            </strong>
            The current snippet query has exceeded the maximum allowable limit of displayable snippets
            </span>
            <br />
            
            You should conduct a search for more accurate results
            
        </p>
    </div>
    </div>
    <br />
}


@if (Model.DisplayMode == CodeStash.DisplayMode.SingleSnippet)
{
    if (Model.IsGrouped)
    {
        <p id="snippetsMessage">As the requested snippet is part of a group, displaying all Code Snippets in Group 
        [@Model.CodeSnippets.First().CodeSnippet.Grouping.Description]</p>
    }
    else
    {
        <p id="snippetsMessage">The requested snippet is shown below</p>
    }
}

@foreach (CodeStash.Models.Snippet.CodeSnippetWrapperViewModel snippet in Model.CodeSnippets)
{
    @Html.Partial("SingleSnippetPartial", snippet);
}
    
    
</div>
